package com.iknow.xmpp.smack.avatar;

import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.xmlpull.v1.XmlPullParser;

public class AvatarProvider
  implements PacketExtensionProvider
{
  public PacketExtension parseExtension(XmlPullParser paramXmlPullParser)
    throws Exception
  {
    new AvatarMetadataExtension();
    new StringBuilder();
    while (true)
    {
      AvatarExtension localAvatarExtension;
      if (0 != 0)
        localAvatarExtension = null;
      while (true)
      {
        return localAvatarExtension;
        if ((paramXmlPullParser.getEventType() != 2) || (!("data".equals(paramXmlPullParser.getName()))))
          break;
        localAvatarExtension = new AvatarExtension(paramXmlPullParser.nextText());
      }
      paramXmlPullParser.next();
    }
  }
}